bitkeeper revision 1.1236.43.11 (4244199bhSeKA6aHwn5DYaLjeLwt9A)
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Fri, 25 Mar 2005 14:00:59 +0000 (14:00 +0000)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Fri, 25 Mar 2005 14:00:59 +0000 (14:00 +0000)
Remove unused function find_last_domain().
Signed-off-by: Keir Fraser <keir@xensource.com>
xen/common/domain.c
xen/include/xen/sched.h

index 09748b93a60e5621171f9cf1f0479ffb64b1bf79..4cf1da4a09214829256bdae335c8c2b23d02eb26 100644 (file)
@@ -41,7 +41,6 @@ struct domain *do_createdomain(domid_t dom_id, unsigned int cpu)
 
     d->id          = dom_id;
     ed->processor  = cpu;
-    d->create_time = NOW();
  
     spin_lock_init(&d->time_lock);
 
@@ -107,28 +106,6 @@ struct domain *find_domain_by_id(domid_t dom)
 }
 
 
-/* Return the most recently created domain. */
-struct domain *find_last_domain(void)
-{
-    struct domain *d, *dlast;
-
-    read_lock(&domlist_lock);
-    dlast = domain_list;
-    d = dlast->next_list;
-    while ( d != NULL )
-    {
-        if ( d->create_time > dlast->create_time )
-            dlast = d;
-        d = d->next_list;
-    }
-    if ( !get_domain(dlast) )
-        dlast = NULL;
-    read_unlock(&domlist_lock);
-
-    return dlast;
-}
-
-
 #ifndef CONFIG_IA64
 extern void physdev_destroy_state(struct domain *d);
 #else
@@ -207,6 +184,7 @@ void domain_shutdown(u8 reason)
     raise_softirq(SCHEDULE_SOFTIRQ);
 }
 
+
 unsigned int alloc_new_dom_mem(struct domain *d, unsigned int kbytes)
 {
     unsigned int alloc_pfns, nr_pages;
@@ -349,7 +327,8 @@ long do_boot_vcpu(unsigned long vcpu, full_execution_context_t *ctxt)
 
     sched_add_domain(ed);
 
-    if ( (rc = arch_set_info_guest(ed, c)) != 0 ) {
+    if ( (rc = arch_set_info_guest(ed, c)) != 0 )
+    {
         sched_rem_domain(ed);
         goto out;
     }
index de13d2d7feb8f5aa6b053b5bb01e43f95c7dd50f..3098586f17c0cdae10119940db0c5f0ab7d44186 100644 (file)
@@ -97,7 +97,6 @@ struct exec_domain
 struct domain
 {
     domid_t          id;
-    s_time_t         create_time;
 
     shared_info_t   *shared_info;     /* shared data area */
     spinlock_t       time_lock;
@@ -215,7 +214,6 @@ extern int construct_dom0(
 extern int set_info_guest(struct domain *d, dom0_setdomaininfo_t *);
 
 struct domain *find_domain_by_id(domid_t dom);
-struct domain *find_last_domain(void);
 extern void domain_destruct(struct domain *d);
 extern void domain_kill(struct domain *d);
 extern void domain_shutdown(u8 reason);
@@ -401,7 +399,6 @@ static inline void domain_unpause_by_systemcontroller(struct domain *d)
 #include <xen/slab.h>
 #include <xen/domain.h>
 
-
 #endif /* __SCHED_H__ */
 
 /*